home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
others
/
crypt
/
pgp26uib
/
contrib
/
mail_tin
/
postpgp
< prev
next >
Wrap
Text File
|
1994-06-19
|
1KB
|
42 lines
#!/usr/local/perl
# written by jason steiner, jsteiner@anwsun.phya.utoledo.edu, Jan 1993
#
# if you use or make improvements to this program i would appreciate
# copies of your modifications & your PGP public key.
($visual = $ENV{'VISUALBAK'}) || ($visual = '/usr/ucb/vi');
print "starting $visual.\n";
system($visual,@ARGV);
while (!$q) {
print "Sign this message? [Y]: ";
$q=<STDIN>;
chop $q;
if (($q eq 'Y') || ($q eq 'y') || ($q eq '')) {
push(@opts,'-st','+clearsig=on');
$q="y";
}
elsif (($q ne 'N') && ($q ne 'n')) {
$q='';
}
}
if (@opts) {
$name=$ARGV[$#ARGV];
open(INPUT,$name);
open(HEAD,">${name}.head");
open(BODY,">${name}.body");
while (<INPUT>) {
if (1 .. /^$/) { print HEAD; }
else { print BODY; }
}
close(HEAD);
close(BODY);
system('pgp','-a',@opts,"${name}.body");
unlink($name);
system "cat ${name}.head ${name}.body.asc > $name";
unlink("${name}.head");
unlink("${name}.body");
unlink("${name}.body.asc");
}